<?PHP
require_once('classes/classVideos.php');
require_once('classes/classUtils.php');

$videos = new Videos();
$utils = new Utils();

if(isset($_GET["nid"])){
    $videos->delVideo($_GET["nid"]);
}

$arrVideos = $videos->getTop10();

$sRows ='';
?>
<form action="" method="post" name="frmDelNotas">
    <table width="100%" border="1" cellspacing="2" cellpadding="4">
        <tr class="tablaEditor">
            <td>&nbsp;</td>
            <td>Titulo</td>
			<td>Link</td>
			<td>Video Number</td>
        </tr>
        <?PHP
        for($i=0; $i<sizeof($arrVideos); $i++){

            if($i%2==0){
                $sRows .= "<tr class='evenRow'>";
            }
            else{
                $sRows .= "<tr class='oddRow'>";
            }

            $sRows .= "<td><a href=\"Editor.php?AX=8&BX=24&nid="
                .$arrVideos[$i]["id"]."\">Borrar</a></td>
		    <td>".$arrVideos[$i]["titulo"]."</td>
		    <td>".$arrVideos[$i]["link"]."</td>
		    <td>".$arrVideos[$i]["video_number"]."</td>
		  </tr>";
        }

        echo $sRows;
        ?>
        <tr>
            <td colspan="4">&nbsp;</td>
        </tr>
    </table>
</form>